<template>
  <div>
    <el-table :data="logs" style="width: 100%;margin-top: 30px;" border v-loading="loading">
      <el-table-column prop="username" label="登录账户" width="180" align="center">
      </el-table-column>
      <el-table-column prop="lastLogin.ip" label="上次登录ip" width="180" align="center">
      </el-table-column>
      <el-table-column prop="lastLogin.loginTime" label="上次登录时间" align="center"> </el-table-column>
      <el-table-column prop="nowLogin.ip" label="本次登录ip" align="center"> </el-table-column>
      <el-table-column prop="nowLogin.loginTime" label="本次登录时间" align="center"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
import * as permissionApi from "@/api/users";
export default {
  created() {
    permissionApi.getLoginLogApi().then((res) => {
      console.log(res.data.data);
      this.logs=res.data.data
      this.loading=false
    });
  },
  data() {
    return {
      logs: [],
      loading:true
    };
  },
  meta: { title: "glsy", icon: "iconfont icon-shouye1" },
  // mounted() {
  //   this.$route.dispatch('FETCH_MENULIST')
  // },
};
</script>